import org.apache.flink.api.common.functions.MapFunction;

/**
 * @Author lzc
 * @Date 2023/6/19 09:21
 */
public class WaterSensorMapFunction implements MapFunction<String, WaterSensor> {
    
    @Override
    public WaterSensor map(String value) throws Exception {
        String[] data = value.split(",");
        return new WaterSensor(data[0], Long.valueOf(data[1]), Integer.valueOf(data[2]));
    
    }
}
